Open
Conversation
Melevir
reviewed
May 20, 2023
Contributor
Melevir
left a comment
There was a problem hiding this comment.
Исправляй странное с none_type и ещё пару мелочей и будет нормас :)
level_1/1.py
Outdated
| @@ -1,7 +1,7 @@ | |||
| from constants import ___ | |||
| from constants import none_type | |||
Contributor
There was a problem hiding this comment.
Нет, этот импорт нужен просто как плейсхолдер "напишите аннотацию тут". Тебе надо написать аннотации вместо ___, поудалять эти ненужные импорты, а для нан использовать None.
level_1/1.py
Outdated
|
|
||
|
|
||
| def is_user_banned(user_id: ___) -> ___: | ||
| def is_user_banned(user_id: int|none_type) -> bool: |
Contributor
There was a problem hiding this comment.
Тут user_id не может быть нан, нет такого ни в примерах ни по смыслу не подходит.
level_1/10.py
Outdated
|
|
||
|
|
||
| def stringify(value: ___) -> ___: | ||
| def stringify(value: none_type|str) -> str: |
Contributor
There was a problem hiding this comment.
Тут value может быть много чем кроме строки и нана, так что аннотация неправильная.
level_1/4.py
Outdated
|
|
||
|
|
||
| def calculate_age(date_of_birth: ___) -> ___: | ||
| def calculate_age(date_of_birth: datetime.date|none_type) -> int: |
Contributor
There was a problem hiding this comment.
Дата рождения тоже не может быть нан.
level_1/5.py
Outdated
|
|
||
|
|
||
| def is_correct_email(raw_email: ___) -> ___: | ||
| def is_correct_email(raw_email: str|none_type) -> bool: |
Contributor
There was a problem hiding this comment.
И емейл не может быть нан.
Lvl1 task3 edit1
Применила Callable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Не очень уверена, что поняла смысл None из constants правильно, местами использовала его, лишь бы использовать